Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

git-last-commit

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-last-commit

Read details of the last commit including tags

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is git-last-commit?

The git-last-commit npm package allows you to retrieve information about the last commit in a Git repository. This can be useful for various purposes such as displaying the last commit details in your application, automating release notes, or tracking changes.

What are git-last-commit's main functionalities?

Retrieve Last Commit Information

This feature allows you to retrieve the details of the last commit in the repository. The callback function provides an object containing information such as the commit hash, author, date, and message.

const git = require('git-last-commit');
git.getLastCommit(function(err, commit) {
  console.log(commit);
});

Custom Options

You can specify custom options such as the source and destination directories. This is useful if you want to get the last commit information from a specific directory.

const git = require('git-last-commit');
const options = {
  dst: __dirname,
  src: __dirname
};
git.getLastCommit(function(err, commit) {
  console.log(commit);
}, options);

Other packages similar to git-last-commit

Keywords

FAQs

Package last updated on 21 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc